package org.assistant.csp.dao;

import org.assistant.common.exception.GetFromDBException;
import org.assistant.common.exception.SaveIntoDBException;
import org.assistant.csp.data.Home;

public interface HomeDao {
	/**
	 * 插入一条家庭信息
	 * 
	 * @param createrId
	 *            -创建者ID
	 * @param homeId
	 *            -家庭ID
	 * @param homeName
	 *            -家庭名称
	 * @return Home
	 * @throws SaveIntoDBException
	 * @throws GetFromDBException
	 */
	public Home insertHome(String createrId, String homeId, String homeName)
			throws SaveIntoDBException, GetFromDBException;

	/**
	 * 根据homeId获取家庭信息
	 * 
	 * @param homeId
	 * @return
	 * @throws GetFromDBException
	 */
	public Home getHome(String homeId) throws GetFromDBException;

	/**
	 * 修改一条家庭信息
	 * 
	 * @param home
	 * @throws SaveIntoDBException
	 */
	public void updateHome(Home home) throws SaveIntoDBException;
}
